from django.conf.urls import url, include
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static

from iyinyue.views import home, video, luoyin, ly_teachers, ly_courses, ly_environment

urlpatterns = [
    url(r'^admin/', admin.site.urls),

    url(r'^school/', include('school.urls')),
    url(r'^teacher/', include('teacher.urls')),
    url(r'^students/', include('student.urls')),
    url(r'^accounts/', include('accounts.urls')),
    url(r'^common/', include('common.urls')),
    url(r'^wx/', include('wx.urls')),
    url(r'^news/', include('news.urls')),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^starday/', include('starday.urls')),
]

urlpatterns += (
    url(r'^$', home),
    url(r'^video$', video),
    url(r'^luoyin$', luoyin),
    url(r'^luoyin/teachers$', ly_teachers),
    url(r'^luoyin/courses$', ly_courses),
    url(r'^luoyin/environment$', ly_environment),
)

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
